package com.itheima.Day11.Zifu;

import java.io.*;
import java.nio.charset.StandardCharsets;

public class Test {
    public static void main(String[] args) {
        try (
                FileReader fr = new FileReader("D:\\javajc_ws\\javaEE\\src\\com\\itheima\\Day11\\Zifu\\ceshi");
                FileWriter fw = new FileWriter("D:\\javajc_ws\\javaEE\\src\\com\\itheima\\Day11\\Zifu\\aikun.txt", true);
                BufferedReader br = new BufferedReader(fr);
                BufferedWriter bw = new BufferedWriter(fw);
                ){
            long start = System.currentTimeMillis();
            int x;
            while ((x = br.read()) != -1) {
                bw.write((char)x+"❤");
                fw.flush();



            }
            long end = System.currentTimeMillis();
            System.out.println("复制完毕，耗时："+(end-start));

        }catch (Exception e){
            throw new RuntimeException(e);
        }
    }
}
